load("@rules_cc//cc:defs.bzl", "cc_binary")
load("//bzl:cpp_unittest.bzl", "cpp_unittest")

cpp_unittest(
    name = "align_test",
    srcs = ["AlignTest.cpp"],
    deps = [
        "//folly/lang:align",
        "//folly/portability:gtest",
    ],
)

cpp_unittest(
    name = "aligned_test",
    srcs = ["AlignedTest.cpp"],
    deps = [
        "//folly/lang:align",
        "//folly/lang:aligned",
        "//folly/portability:gtest",
    ],
)

cpp_unittest(
    name = "badge_test",
    srcs = ["BadgeTest.cpp"],
    deps = [
        "//folly/lang:badge",
        "//folly/portability:gtest",
    ],
)

cc_binary(
    name = "bits_benchmark",
    srcs = ["BitsBenchmark.cpp"],
    deps = [
        "//folly:benchmark",
        "//folly:cpp_attributes",
        "//folly:random",
        "//folly/lang:assume",
        "//folly/lang:bits",
    ],
)

cc_binary(
    name = "bits_class_benchmark",
    srcs = ["BitsClassBenchmark.cpp"],
    deps = [
        "//folly:benchmark",
        "//folly/lang:bits_class",
        "@glog",
    ],
)

cpp_unittest(
    name = "bits_class_test",
    srcs = ["BitsClassTest.cpp"],
    deps = [
        "//folly/lang:bits_class",
        "//folly/portability:gflags",
        "//folly/portability:gtest",
        "@glog",
    ],
)

cpp_unittest(
    name = "bits_test",
    srcs = ["BitsTest.cpp"],
    deps = [
        "//folly:random",
        "//folly/lang:bits",
        "//folly/portability:gtest",
    ],
)

cpp_unittest(
    name = "c_string_test",
    srcs = ["CStringTest.cpp"],
    deps = [
        "//folly/lang:c_string",
        "//folly/portability:gtest",
    ],
)

cpp_unittest(
    name = "cast_test",
    srcs = ["CastTest.cpp"],
    deps = [
        "//folly:utility",
        "//folly/lang:cast",
        "//folly/portability:gtest",
    ],
)

cpp_unittest(
    name = "checked_math_test",
    srcs = ["CheckedMathTest.cpp"],
    deps = [
        "//folly/lang:checked_math",
        "//folly/lang:keep",
        "//folly/portability:gtest",
    ],
)

cc_binary(
    name = "exception_bench",
    srcs = ["ExceptionBench.cpp"],
    deps = [
        "//folly:benchmark",
        "//folly/lang:exception",
        "//folly/lang:keep",
    ],
)

cpp_unittest(
    name = "exception_test",
    srcs = ["ExceptionTest.cpp"],
    deps = [
        "//folly:portability",
        "//folly/lang:align",
        "//folly/lang:exception",
        "//folly/lang:keep",
        "//folly/lang:pretty",
        "//folly/portability:gtest",
        "@fmt",
    ],
)

cpp_unittest(
    name = "extern_test",
    srcs = ["ExternTest.cpp"],
    deps = [
        "//folly/lang:extern",
        "//folly/portability:gtest",
    ],
)

cpp_unittest(
    name = "hint_test",
    srcs = ["HintTest.cpp"],
    deps = [
        "//folly/lang:hint",
        "//folly/portability:gtest",
    ],
)

cpp_unittest(
    name = "new_test",
    srcs = ["NewTest.cpp"],
    deps = [
        "//folly/lang:align",
        "//folly/lang:new",
        "//folly/portability:gtest",
    ],
)

cpp_unittest(
    name = "ordering_test",
    srcs = ["OrderingTest.cpp"],
    deps = [
        "//folly/lang:ordering",
        "//folly/portability:gtest",
    ],
)

cpp_unittest(
    name = "propagate_const_test",
    srcs = ["PropagateConstTest.cpp"],
    deps = [
        "//folly/lang:propagate_const",
        "//folly/portability:gtest",
    ],
)

cpp_unittest(
    name = "rvalue_reference_wrapper_test",
    srcs = ["RValueReferenceWrapperTest.cpp"],
    deps = [
        "//folly/lang:rvalue_reference_wrapper",
        "//folly/portability:gtest",
    ],
)

cpp_unittest(
    name = "safe_assert_test",
    srcs = ["SafeAssertTest.cpp"],
    deps = [
        "//folly:benchmark",
        "//folly:conv",
        "//folly/lang:keep",
        "//folly/lang:safe_assert",
        "//folly/portability:gtest",
        "@glog",
    ],
)

cpp_unittest(
    name = "thunk_test",
    srcs = ["ThunkTest.cpp"],
    deps = [
        "//folly:traits",
        "//folly/lang:thunk",
        "//folly/portability:gtest",
    ],
)

cpp_unittest(
    name = "to_ascii_test",
    srcs = ["ToAsciiTest.cpp"],
    deps = [
        "//folly/lang:to_ascii",
        "//folly/portability:gtest",
    ],
)

cpp_unittest(
    name = "type_info_test",
    srcs = ["TypeInfoTest.cpp"],
    deps = [
        "//folly/lang:type_info",
        "//folly/portability:gtest",
    ],
)

cpp_unittest(
    name = "pretty_test",
    srcs = ["PrettyTest.cpp"],
    deps = [
        "//folly/lang:pretty",
        "//folly/portability:gtest",
    ],
)
